<html>
<head>
	<title>用户主页</title>
    <link rel="stylesheet" href="/root/static/bootstrap/bootstrap/dist/css/bootstrap.min.css">
    <link rel="stylesheet" href="/root/static/bootstrap/bootstrap-table/bootstrap-table.min.css">
    <link rel="stylesheet" href="/root/static/font-awesome/css/font-awesome.min.css">
    <script src="/root/static/jquery/jquery.min.js"></script>
	<script src="/root/static/jquery/jquery.cookie.js"/>
    <script src="/root/static/bootstrap/bootstrap/dist/js/bootstrap.min.js"></script>
    <script src="/root/static/bootstrap/bootstrap-table/bootstrap-table.js"></script>
    <script src="/root/static/bootstrap/bootstrap-table/locale/bootstrap-table-zh-CN.js"></script>
    <script src="/root/static/bootstrap/bootstrap-table/export/bootstrap-table-export.js"></script>
    <script src="/root/static/bootstrap/bootstrap-table/export/tableExport.js"></script>
    <script src="/root/static/layer/layer.js"></script>
    <script src="/root/static/bootstrap/bootstrap-valid/bootstrapValidator.min.js"></script>
    <script src="/root/static/bootstrap/bootstrap-valid/zh_CN.js"></script>
	<meta charset="utf-8"/>
</head>
<body>
<h1><span id="user"></span>,欢迎登陆系统</h1>
<script>
	$(function(){
		var token = $.cookie('cloud-token');
		$.get("/api/user/info/" + token, function(res){
			if(res.success) {
				$("#user").text(res.data.email);
			} else {
				layer.msg(res.msg, {icon:2,timeout:1000}, function(){
					if (403==res.code) {
					location.href="/root/login.html";
					}
				});
				
			}
		})
	});
</script>
</body>
</html>